import request from '@/utils/request'
export default {
  list(page, keywords) {
    const url = 'admin/order/list'
    return request.post(url, { page, search: keywords })
  },
  confirm(orderSn) {
    const url = 'admin/order/confirm'
    return request.post(url, { orderSn })
  },
  finish(orderSn) {
    const url = 'admin/order/finish'
    return request.post(url, { orderSn })
  },
  cancel(id) {
    const url = 'admin/order/cancel'
    return request.post(url, { id })
  },
  update(id, data) {
    const url = 'admin/order/update'
    return request.post(url, { id, data })
  }
}
